#include<stdio.h>
#include<stdlib.h>
struct MarkRecord
{
    int id;
    char name[20];
    float mark;
};
int main()
{
    char s;
    FILE *pfile=fopen("MarkRecord.txt","rb");
    if(pfile==NULL)
    {
        printf("open file fail.\n");
        exit(0);
    }
   while((s=fgetc(pfile))!=EOF)
   {
       printf("%c",s);
   }
   printf("Do you want to enter marks?\n");
   printf("Please enter 'Y'or'N':");
   char a;
   scanf("%c",&a);
   if(a=="N")
   exit(0);
   printf("How many marks do you want to enter?\n");
   int n;
   scanf("%n",&n);
   struct MarkRecord student[n];
   printf("Please enter.\n");
   for(int i=0;i<=n;i++)
   {
       int num1;
       char num2;
       float num3;
       scanf("%d %c %f",&num1,&num2,&num3);
       student[i]=（struct MarkRecord){num1,num2,num3};
   }
   
   fclose(pfile);
    return 0;
}